]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
animation: Set size through CSS
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 6 Apr 2020 14:19:28 +0000 (11:19 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 6 Apr 2020 14:24:30 +0000 (11:24 -0300)
Pretty much the same case of the previous commit: we want this size
to be scale-dependant, and using the width and height properties of
ClutterActor doesn't automatically update.

Use CSS to set the width and height.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

js/ui/animation.js

index 2344851adc13bea575af441d6951b382d5f6716f..fa8cad932acf42c7d8b1f02f0cf2abd8bcfa3338 100644 (file)
@@ -15,8 +15,7 @@ class Animation extends St.Bin {
         const themeContext = St.ThemeContext.get_for_stage(global.stage);
 
         super._init({
-            width: width * themeContext.scale_factor,
-            height: height * themeContext.scale_factor,
+            style: `width: ${width}px; height: ${height}px;`,
         });
 
         this.connect('destroy', this._onDestroy.bind(this));